package com.jeesite.modules.kj.schedule.integral;

import com.jeesite.modules.kj.entity.KjMember;
import com.jeesite.modules.kj.entity.KjMemberIntegrals;
import com.jeesite.modules.kj.service.KjActivityService;
import com.jeesite.modules.kj.service.KjMemberIntegralsService;
import com.jeesite.modules.kj.service.KjMemberService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 定时清除积分
 */
@Component
@Configuration
@EnableScheduling
@Slf4j
public class ClearIntegrals {
    @Autowired
    KjMemberService kjMemberService;
    @Autowired
    KjMemberIntegralsService kjMemberIntegralsService;
//    @Scheduled(cron = "0 0 0 1 1 ? *")
    public void updateStatus(){
        log.info("正在清除用户数据");
        List<KjMemberIntegrals> integralsList = kjMemberIntegralsService.findList(new KjMemberIntegrals());
        for (KjMemberIntegrals integrals: integralsList
             ) {

        }
    }
}
